<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/pageHead.jsp"%>
<script type="text/javascript">
	$(document).ready(function() {
		$("#butReturn").click(function(){
			parent.document.location.reload();
			$.fn.closeIssWindow();
		});
	});
	
	function save(){
		var exp = $('#form1').validationEngine('validate');
		if(exp==true){
			// 显示进度条
			showSending();
			$.ajax({
				type: 'POST',
			    url: '${systemctx}/topic/poster/updatePoster.json',
			    data: $("#form1").serialize(),
			    dataType: 'json',
			    success: function(data) {
			    	//关闭执行...
					closeSending();
			    	if(data.messagetype == 1){
			    		alert(data.message)
			    		parent.document.location.reload();
					    $.fn.closeIssWindow();
			    	}else {
			    		alert(data.message)
			    		return;
			    	}
			    }
			});
		}
	}
</script>
<form name="form1" id="form1" action="" method="post">
	<div class="pageMain">
		<div class="pageTitle">
			<%=MessageResourcesUtils.getMessage(request, "systemmanage.contentmanagement.title")%>
			<span></span>
			<%=MessageResourcesUtils.getMessage(request, "topic.poster.title") %>
			<span></span>
			<%=MessageResourcesUtils.getMessage(request, "topic.poster.edit.title")%>
		</div>
		<div class="pageBody">
			<div class="form-group">
				<ul>
					<li>
						<i>*</i> 
						<label>
							<%=MessageResourcesUtils.getMessage(request, "topic.poster.col.filename") %>
						</label>
						<span>
							<input value="${poster.id}" name="id" id="id" type="hidden">
							<input type="text" name="filename" id="filename" value="${poster.filename}" class="validate[required,maxSize[240]]" />
						</span>
					</li>
					<li>
						<i></i> 
						<label>
							<%=MessageResourcesUtils.getMessage(request, "topic.poster.col.filesize") %>
						</label>
						<span>
							${poster.filesize}
						</span>
					</li>
				</ul>
				<ul>
					<li>
						<i></i> 
						<label>
							<%=MessageResourcesUtils.getMessage(request, "topic.poster.col.mongofilename") %>
						</label>
						<span>
							${poster.mongofilename}
						</span>		
					</li>
					<li>
						<i>*</i> 
						<label>
							<%=MessageResourcesUtils.getMessage(request, "topic.poster.col.sortnumber") %>
						</label>
						<span>
							<input value="${poster.sortnumber}" name="sortnumber" id="sortnumber" class="validate[required,maxSize[10],custom[number]]">
						</span>
					</li>
				</ul>
				<ul>
					<li>
						<i></i> 
						<label>
							<%=MessageResourcesUtils.getMessage(request, "topic.poster.col.suffix") %>
						</label>
						<span>
							${poster.suffix}
						</span>		
					</li>
					<li>
						<i></i> 
						<label>
							<%=MessageResourcesUtils.getMessage(request, "topic.poster.col.type") %>
						</label>
						<span>
							${poster.type}
						</span>		
					</li>
				</ul>
			</div>
			<div class="button-group">
				<input type="button" class="btn btn-default" id="butSave" onclick="save()" name="butSave"  value='<%=MessageResourcesUtils.getMessage(request, "common.button.update") %>' />
				<input type="button" class="btn btn-default" id="butReturn" name="butReturn" value='<%=MessageResourcesUtils.getMessage(request, "common.button.back") %>' />
			</div>
		</div>
	</div>
</form>

<%-- 引入页面尾 --%>
<%@ include file="/pageFloor.jsp"%>